# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=python-openapi-core
_pipname=openapi_core
pkgver=0.17.1
pkgrel=5
pkgdesc='Client-side and server-side support for the OpenAPI Specification v3'
arch=(any)
url='https://github.com/p1c2u/openapi-core'
license=(BSD)
depends=(python-openapi-spec-validator python-werkzeug python-isodate python-more-itertools)
makedepends=(python-build python-installer python-poetry-core)
source=(https://pypi.io/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$pkgver.tar.gz)
sha256sums=('561b7e2b37b336e9c62d4634b9059d12d9bb2e1859062a39d3a0fa6afc8c9de6')

build() {
  cd $_pipname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_pipname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
